<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Matrix Infoline">


<link rel="shortcut icon" href="img/favicon.html">

<title>SITE ADMINISTRATOR</title>

<!-- Bootstrap core CSS -->
<link href="<?= base_url();?>assets/admin/css/bootstrap.min.css"
	rel="stylesheet">
<link href="<?= base_url();?>assets/admin/css/bootstrap-reset.css"
	rel="stylesheet">
<!--external css-->
<link href="<?= base_url();?>assets/admin/css/font-awesome.css"
	rel="stylesheet" />
<!-- Custom styles for this template -->
<link href="<?= base_url();?>assets/admin/css/style.css"
	rel="stylesheet">
<link href="<?= base_url();?>assets/admin/css/style-responsive"
	rel="stylesheet" />

<!-- include summernote css/js-->
<link rel="stylesheet"
	href="<?= base_url();?>assets/admin/css/summernote.css" />

<!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
<!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
      <script src="js/respond.min.js"></script>
    <![endif]-->
</head>

<body data-baseurl="<?= base_url(); ?>">

	<section id="container" class="">
		<!--header start-->
		<?php
		if (isset($template['partials']['nav_bar']))
			echo $template['partials']['nav_bar'];
		?>
		<!--header end-->
		<!--sidebar start-->

		<?php
		if (isset($template['partials']['side_menu']))
			echo $template['partials']['side_menu'];
		?>

		<!--sidebar end-->
		<!--main content start-->
		<section id="main-content">
			<?php echo $template['body'];?>
		</section>
		<!--main content end-->
	</section>


<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
	<!-- js placed at the end of the document so the pages load faster -->
	<script src="<?= base_url();?>assets/admin/js/jquery.js"></script>
	<script src="<?= base_url();?>assets/admin/js/jquery-1.8.3.min.js"></script>
	<script src="<?= base_url();?>assets/admin/js/bootstrap.min.js"></script>


	<!--common script for all pages-->
	<script src="<?= base_url();?>assets/admin/js/common-scripts.js"
		type="text/javascript"></script>
	<script type="text/javascript"
		src="<?= base_url();?>assets/admin/js/summernote.min.js"></script>
	<script src="<?= base_url();?>assets/admin/js/custom.js"
		type="text/javascript"></script>
		<script type="text/javascript" src="<?= base_url();?>assets/js/img.js"></script>
		<script src="<?= base_url();?>assets/js/yp.js"
		type="text/javascript"></script>

<script>
$(document).ready(function() {
	$('#summernote').summernote({
		  height: 200,   //set editable area's height
		  focus: false,    //set focus editable area after Initialize summernote
		  toolbar: [
		            //['style', ['style']], // no style button
		            ['style', ['bold', 'italic', 'underline', 'clear']],
		            ['fontsize', ['fontsize']],
		            ['color', ['color']],
		            ['para', ['ul', 'ol', 'paragraph']],
		            ['height', ['height']],
		            ['insert', ['link']], // ['picture', 'link'] no insert buttons
		            //['table', ['table']], // no table button
		            //['help', ['help']] //no help button
		          ]
		});
	  
	});
</script>
<script>

	
//FUNCTION TO GET AND AUTO PLAY YOUTUBE VIDEO FROM DATATAG
function autoPlayYouTubeModal(){
  var trigger = $("body").find('[data-toggle="modal"]');
  trigger.click(function() {
    var theModal = $(this).data( "target" ),
    videoSRC = $(this).attr( "data-theVideo" ), 
    videoSRCauto = videoSRC+"?autoplay=1" ;
    $(theModal+' iframe').attr('src', videoSRCauto);
    $(theModal+' button.close').click(function () {
        $(theModal+' iframe').attr('src', videoSRC);
    });   
  });
}    

$(document).ready(function(){
	  autoPlayYouTubeModal();
	});


</script>



<script type="text/javascript">
$(document).ready(function(){
$('#mymap5').show();
var lat = $('#lat').val();
var longg = $('#long').val();

//alert(longg);

var latlng = new google.maps.LatLng(lat,longg);
    var map = new google.maps.Map(document.getElementById('map5'), {
        center: latlng,
        zoom: 14,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    });
    var marker = new google.maps.Marker({
        position: latlng,
        map: map,
        title: 'Set lat/lon values for this property',
        draggable: true
    });
	 google.maps.event.addListener(marker, 'dragend', function(a) {
        console.log(a);
              
		document.getElementById('lat').value = a.latLng.lat().toFixed(4);
		document.getElementById('long').value = a.latLng.lng().toFixed(4);
        document.getElementsByTagName('body')[0].appendChild(div);
    });
	
});


function getlatttttlong() {
	$('#mymap5').show();


	
	var geocoder = new google.maps.Geocoder();
	
	var street=$("#address1").val();
	var state=$("#statediv option:selected").html();
	var city=$("#citydiv option:selected").html();
	
	//var address=country+','+state+','+city+','+street;
	var address=street+','+city+','+state;
	
	
	geocoder.geocode( { 'address': address}, function(results, status) {

	if (status == google.maps.GeocoderStatus.OK) {
    var latitude = results[0].geometry.location.lat();
	var longitude = results[0].geometry.location.lng();
	document.getElementById('lat').value=latitude;
	document.getElementById('long').value=longitude;
    } 

	
    var latlng = new google.maps.LatLng(latitude,longitude);
    var map = new google.maps.Map(document.getElementById('map5'), {
        center: latlng,
        zoom: 14,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    });
    var marker = new google.maps.Marker({
        position: latlng,
        map: map,
        title: 'Set lat/lon values for this property',
        draggable: true
    });
    google.maps.event.addListener(marker, 'dragend', function(a) {
        console.log(a);
       
        
		document.getElementById('lat').value = a.latLng.lat().toFixed(4);
		document.getElementById('long').value = a.latLng.lng().toFixed(4);
        document.getElementsByTagName('body')[0].appendChild(div);
    });
	}); 
};
</script>

</body>
</html>
